<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--        <script src="when/when.js"></script>-->
        <script src="http://autobahn.s3.amazonaws.com/js/autobahn.min.js"></script>
        <script>
            var conn = new ab.Session(
            'ws://localhost:8098' // The host (our Ratchet WebSocket server) to connect to
            , function() {            // Once the connection has been established
                console.warn('WebSocket已经连接');
                conn.subscribe('SVN information', function(topic, data) {
                    // This is where you would add the new article to the DOM (beyond the scope of this tutorial)
                    //console.log('作者:' + data.author);
                    //console.log('时间:' + data.when);
                    //console.log('版本:' + data.revison);
                    //console.log('信息:' + data.message);
                    //console.log(data.list);
                    console.log(data);
                });
            }
            , function() {
                console.warn('WebSocket连接已关闭');
            }
            , { // Additional parameters, we're ignoring the WAMP sub-protocol for older browsers
                'skipSubprotocolCheck': true
            }
        );
        </script>
    </head>
    <body>
        <h1>测试页面，请看console控制台!</h1>
    </body>
</html>